package org.example.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.List;

/**
 * 部门表
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "department")
public class Department {
    /**
     * 主键ID
     */
    @TableId(value = "dept_id", type = IdType.INPUT)
    private Integer deptId;

    /**
     * 父部门ID，0表示一级部门
     */
    @TableField(value = "parent_id")
    private String parentId;

    /**
     * 部门名称
     */
    @TableField(value = "dept_name")
    private String deptName;

    /**
     * 负责人
     */
    @TableField(value = "leader")
    private String leader;

    /**
     * 联系电话
     */
    @TableField(value = "phone")
    private String phone;

    /**
     * 邮箱
     */
    @TableField(value = "email")
    private String email;

    /**
     * 状态：0-禁用 1-启用
     */
    @TableField(value = "`status`")
    private Boolean status;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private Date updateTime;

    /**
     * 创建人
     */
    @TableField(value = "create_by")
    private String createBy;

    /**
     * 更新人
     */
    @TableField(value = "update_by")
    private String updateBy;

    /**
     * 备注
     */
    @TableField(value = "remark")
    private String remark;
    @TableField(exist = false)
    private List<Post> post;
    @TableField(exist = false)
    private List<Employee> employee;

    @TableField(exist = false)
    private List<Department> children;

    @TableField(exist = false)
    private List<DepartmentalStructure> departmentalStructure;
}